/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Test;

import Entity.Owner;
import Services.OwnerService;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;

/**
 *
 * @author microraptor
 */
public class TestHPVAS {
    
    public TestHPVAS (){
        EntityManagerFactory emf;
        EntityManager em;

        emf = Persistence.createEntityManagerFactory("HPVAS-2013-1-BPU");

        Owner o = new Owner("Juanito", "Agonia", "Returns");
        
        em = emf.createEntityManager();
        OwnerService os = new OwnerService(emf);
        
        try{
            os.crear(o);
        }catch (Exception e){
            System.out.println("Pailas");
        }
    }
    
    public static void main(String[] args){
        TestHPVAS thp = new TestHPVAS();
    }
}
